package DynamicProgramming;

import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.Scanner;

class Solver1036
{	int n,s,bound=9;
	BigInteger[][] Rs;
	
	public void Input()
	{	Scanner in=new Scanner(System.in);
		n=in.nextInt();s=in.nextInt();
		Rs=new BigInteger[n+1][s+1];
	}
	public void Solve()
	{	if (s%2==0)
		{	s=s/2;
			for (int i=0;i<=s;i++)
				if (i<=bound)
					Rs[1][i]=BigInteger.ONE;
				else
					Rs[1][i]=BigInteger.ZERO;
			for (int i=2;i<=n;i++)
				for (int j=0;j<=s;j++)
				{	BigInteger accu=BigInteger.ZERO;
					for (int k=0;k<=9;k++)
						if (j-k>=0)
							accu=accu.add(Rs[i-1][j-k]);
						else
							break;
					Rs[i][j]=accu;
				}
		}
		else
			Rs[n][s]=BigInteger.ZERO;
	}
	public void Output()
	{	PrintWriter out=new PrintWriter(System.out);
		out.println(Rs[n][s].multiply(Rs[n][s]));
		out.flush();
	}
	public void main()
	{	Input();
		Solve();
		Output();
	}
}
public class P1036
{	public static void main(String[] args)
	{	Solver1036 solver=new Solver1036();
		solver.main();
	}
}
